﻿using System;
using EasyStep.Attributes;
using EasyStep.TestExecution.Data;
using EasyStep.TestExecution.Interfaces;
using OpenQA.Selenium;
using EasyStep.TestActions.Utils;
using System.Threading;

namespace EasyStep.TestActions.Actions.Wait
{
    [TestAction(typeof(Wait),  Name = "Sleep", RequireLocator=false)]
    class Sleep : ITestAction<IWebDriver>
    {
        
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            Thread.Sleep(Convert.ToInt32(data.Data));
        }
    }
}